<style> .layui-form-select dl { max-height:200px; }
.audio_msg .layui-layer-content{background-color: #fff; color: #1198fa;}</style>
    <div class="tts"  id="stuContent" style="display: none;padding: 10px">
                <form class="layui-form" >
                    <div class="panel panel-default" role="tabpanel" style="">
                        <div class="panel-heading">导入手机号</div>
                        <div class="layui-form-item">
                            <textarea rows="20" cols="20" class="form-control"  name="stu_text" id="stu_text" style="resize: none;"></textarea>
                        </div>
                    </div>
                    <div class="layui-form-item" style="text-align: center;">
                            <button type="button"  class="layui-btn  layui-btn-lg" id="entryStu">提交</button>
                            <audio id="audioTts" src="" style="display: none;"></audio>
                    </div>
                </form>
          </div>

<script type="text/javascript">
    var bgMusicArr = [];
    layui.use(['form','layer','jquery','element'], function(){
        var slider = layui.slider;
        var form = layui.form;
        var $ = layui.$;
        var layer = layui.layer;
        var ttsOpen;
        $('#addStu').click(function(){
            ttsOpen = layer.open({
                type: 1,
                title: false,
                closeBtn: 1,
                anim: 2,
                shadeClose: true,
                area:  ['800px', '600px'],
                content: $("#stuContent"),
                btn: false,
                zIndex:1000,
                success: function(layero, index){

                },
                cancel: function(index, layero){
                    $("#stu_text").val('');
                    layer.close(index);
                    return false;
                }
            });
        });

        $(document).on('click',"#entryStu",function(){
             var text = $("#stu_text").val();
             var url = "{php echo createWebUrl('stu_data',array('op' => 'entryStu','themeid'=>$id));}";
             $.ajax({
                url: url,
                type: 'post',
                data: {
                    text: text
                },
                dataType: "json",
                success: function (res) {
                    var msg = res.msg;
                    layer.msg(msg);
                    $('#stu_total').html(res.data.total);
                },
                error: function (e) {
                    layer.msg("提交失败！")
                },
            });
            return false;
        });
        //删除
        $('#delStu').click(function(){
            layer.confirm('确定清空数据？',{
                btn:['确定']
            },function () {
                var url = "{php echo createWebUrl('stu_data',array('op' => 'delStu','themeid'=>$id));}";
                $.get(url, function (res) {
                    layer.msg('清空成功');
                    $('#stu_total').html('0');
                });
            })
        });

    })

</script>